The present invention relates to computer graphics, and more particularly, relates to a method and apparatus for pixel filtering using commonly shared filter resource between an overlay engine (2D graphics engine) and a texture mapping engine (3D graphics engine) in a computer system.
A typical computer system includes a processor subsystem of one or more microprocessors such as Intel(copyright) i386, i486, Celeron(trademark) or Pentium(copyright) processors, a memory subsystem, one or more chipsets provided to support different types of host processors for different platforms such as desktops, personal computers (PC), servers, workstations and mobile platforms, and to provide an interface with a plurality of input/output (I/O) devices including, for example, keyboards, input devices, disk controllers, and serial and parallel ports to printers, scanners and display devices. Chipsets may integrate a large amount of I/O bus interface circuitry and other circuitry onto only a few chips. Examples of such chipsets may include Intel(copyright) 430, 440 and 450 series chipsets, and more recently Intel(copyright) 810 and 8XX series chipsets. These chipsets may implement, for example, the I/O bus interface circuitry, direct memory access (DMA) controller, graphics controller, graphics memory controller, and other additional functionality such as graphics visual and texturing enhancements, data buffering, and integrated power management functions.
For graphics/multimedia applications, video data may be obtained from a video source by a graphics controller and displayed on a display monitor for viewing purposes. In traditional three-dimensional (3D) graphics systems, 3D images may be generated for representation on a two-dimensional (2D) display monitor. The 2D representation may be provided by defining a 3D model space and assigning sections of the 3D model space to pixels for a visual display on the display monitor. Each pixel may display the combined visual effects such as color, shade and transparency defined on an image.
The visual characteristics of the 2D representation of the 3D image may also be enhanced by texturing. Texture may represent changes in intensity, color, opacity, or thematic contents (such as surface material type). The process of applying texture patterns to surfaces (adding graphics to scenery) is generally referred to as xe2x80x9ctexture mappingxe2x80x9d and is well known and widely used technique in computer graphics. The texture may be represented by a 2D array of video data. Data elements in the array are called texels and the array is called a texture map. The two coordinate axes of the texture coordinate space are defined by rows and columns of the array typically designated in xe2x80x9cUxe2x80x9d and xe2x80x9cVxe2x80x9d coordinates.
Due to various geometric considerations and physical constraints on the amount of data representative of the texture map and pixel array on the display monitor, an image, pattern or video displayed on the display monitor may be subject to visual anomalies or distortions caused by an overlay or a texture manipulation such as, for example, shrinking or enlarging textures during perspective correction. Different types of filtering techniques may be used to prevent texture distortions. For example, an overlay vertical interpolator filter may be used to filter 2D data input from an overlay engine to approximate the vertical stretch blit (block level transfer) in the 2D overlay. Separately, a bilinear texture filter may be used to filter 3D data input from a 3D engine to approximate the perspective correct shading value of a 3D triangular surface.
However, separate 2D and 3D arithmetic circuits are necessarily required at separate locations (i.e., the overlay engine and the 3D engine) to perform the 2D overlay stretch blit and the 3D texture cache functions. These arithmetic circuits can be burdensome and cost-prohibitive. In addition, separate linear interpolators are also required for different data formats to calculate multiple color resolutions.
Accordingly, a need exists for a cost-effective filter solution with less hardware to eliminate the need to create separate 2D and 3D arithmetic circuits for the 2D overlay stretch blit and the 3D texture cache functions, and separate linear interpolators for different data formats for multiple color resolutions.
Accordingly, various embodiments of the present invention are directed to a configurable filter module for providing commonly shared filter resource between an overlay engine and a texture mapping engine of a graphics system. Such a filter module may comprise a plurality of linear blend units each of which receives data input from one of the overlay engine and a mapping engine cache, and generates a linear blend filter output respectively; a filter output multiplexer which receives data output from the linear blend units and selects a proper byte ordering output, wherein the linear blend units serve as an overlay interpolator filter to receive data input from the overlay engine for a linear blending function during a linear blend mode, and serve as a texture bilinear filter to receive data input from the mapping engine cache for a texture bilinear filtering function during a bilinear filtering mode.